package others;

import java.util.regex.Pattern;

public class Hint {
    public static void main(String[] args) {
        String s = seeColor("xxred");
        System.out.println(s);
    }
    public static String seeColor(String str) {
        String red = "^red\\S+";
        String blue = "^blue\\S+";
        Pattern compile = Pattern.compile(red);
        Pattern pattern = Pattern.compile(blue);
        if (compile.matcher(str).find()){
            return "red";
        }else if (pattern.matcher(str).find()){
            return "blue";
        }else return "";
    }
}
